package com.example.reactivelambda;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RouterFunction;

import static org.springframework.http.ResponseEntity.ok;
import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RouterFunctions.route;
import static reactor.core.publisher.Mono.just;

@Configuration
public class RouteFunctionConfig {


//    @Bean
//    public RouterFunction<?> helloRouteFunction(){
//        return route(GET("/hello"),
//                serverRequest -> ok().body(just("hello World"),String.class))
//                .andRoute(GET("/bye"),serverRequest ->ok().body(just("See ya"),String.class) );
//    }
}
